<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/common.css?version=1.2.8">
    <link rel="stylesheet" href="./css/01/05.css?version=1.2.8">
    <link rel="stylesheet" href="./css/swiper.min.css">
    <!-- <link rel="stylesheet" href="./css/detail/maindetail.css"> -->
    <link rel="stylesheet" href="./css/fixed-table.css?version=1.2.8" />
    <script src="./js/jquery-2.2.4.min.js?version=1.2.8"></script>
    <script src="./js/echarts3.8.5_min.js?version=1.2.8"></script>
    <script src="./js/fastclick.js?version=1.2.8"></script>
    <script src="./js/iscroll-probe.min.js"></script>
</head>

<body>
    <div class="c-content characterMap" id="contentindex">
        <!--********************************* top model*********************************** -->
        <div class="top-model" id="top-model">
                <div class="top-content clearfix">
                    <div class="topright fl">
                        <!-- <div class="top-more">>>>>></div> -->
                        <div class="top-message">
                            <div class="system">
                                <a class="goback-syz bg-color-bg ineditfirst inedit">
                                    <img src="./img/system/edit.png" alt="">  
                                </a>
                                <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                    <img src="./img/system/main.png" alt="">
                                </a>
                                <a class="goback-sys bg-color-bg">
                                    <img src="./img/system/change.png" alt="">
                                </a>
                                <a class="gomain-sys bg-color-bg">
                                    <img src="./img/system/setting.png" alt="">
                                </a>
                                <div class="truemodel">
                                    <div class="truelists">选择模板</div>
                                    <!-- <div class="changekh">修改口号</div> -->
                                    <div class="jgsj">间隔时间</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <!--********************************* main model*********************************** -->
        <div class="main-model container1">
            <div class="nodata inedit ">
                <h4><a href="javascript:;">点击添加特色图</a></h4>
            </div>
            <div class="swiper-container main-container">
                <div class="swiper-wrapper swiper-list">
                    <!-- <div class="swiper-slide swiper-no-swiping">
                        <img src="../BZwhq/img/01/bg.jpg" alt="">
                    </div>
                    <div class="swiper-slide swiper-no-swiping">
                        <img src="../BZwhq/img/02/bg.jpg" alt="">
                    </div> -->
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
        <!-- 全屏预览图片 -->
        <div id="popup">
            <div class="bg">
                <img src=""/>
            </div>
        </div>
        <!-- 个性化弹窗 -->
        <div class="diago" style="display: none;">
            <div class="diado-content diago-active">
                <div class="diago-title bg-color-bg">
                    <div class="diago-left">个性化设置</div>
                    <div class="diago-close"></div>
                </div>
                <div class="model-content">
                    <div class="model-list">
                        <ul class="modelUl clearfix">
                            <li class="active">
                                <div class="modelDiv">
                                    <p>模板一</p>
                                    <span class="modelSpan"></span>
                                </div>
                            </li>
                            <li>
                                <div class="modelDiv">
                                    <p>模板二</p>
                                    <span class="modelSpan"></span>
                                </div>
                            </li>
                            <li>
                                <div class="modelDiv">
                                    <p>模板三</p>
                                    <span class="modelSpan"></span>
                                </div>
                            </li>
                            <li>
                                <div class="modelDiv">
                                    <p>模板四</p>
                                    <span class="modelSpan"></span>
                                </div>
                            </li>
                            <li>
                                <div class="modelDiv">
                                    <p>模板五</p>
                                    <span class="modelSpan"></span>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="diago-bottom">
                    <div class="totrue">确定</div>
                    <div class="cancel">取消</div>
                </div>
                <div class="choose">

                </div>
            </div>
        </div>
        <!-- 修改口号弹窗 -->
        <div class="diagoT">
            <div class="diago-content">
                <div class="diago-title bg-color-bg">
                    <div class="diago-left">口号设置</div>
                    <div class="diago-close"></div>
                </div>
                <div class="cont-diago">
                    <input type="text" id="cont-value">
                </div>
                <div class="diago-bottom">
                    <div class="btn">确定</div>
                    <div class="cancelbtn">取消</div>
                </div>
            </div>
        </div>
        <!-- 间隔修改弹窗 -->
        <div class="diagoTime">
            <div class="diago-content" style="width:600px;">
                <div class="diago-title bg-color-bg" style="width:600px;">
                    <div class="diago-left">间隔修改</div>
                    <div class="diago-close"></div>
                </div>
                <div class="cont-diagoTime">
                    <div class="itemt">
                        3s
                    </div>
                    <div class="itemt">
                        5s
                    </div>
                    <div class="itemt">
                        10s
                    </div>
                    <div class="itemt">
                        20s
                    </div>
                </div>
                <div class="diago-bottom">
                    <div class="btnTime">确定</div>
                    <div class="cancelbtn">取消</div>
                </div>
            </div>
        </div>              
        <!-- 编辑特色图弹窗 -->
        <div class="dialogP">   
            <div class="diado-content">
                <div class="diago-title">
                    <div class="diago-left">编辑特色图</div>
                    <div class="diago-close" onclick="closeDialogP()"></div>
                </div>
                <div class="dialogP-content">
                    <span style="font-size: 12px;color: #b3a8a8;">图片最佳比例是16:9，图片质量不超过8M</span>
                    <div class="upload">                                                        
                        <div class="upload_imgs">
                            <div class="img-uploadBox">
                                <input type="file" accept="image/*" name="files" class="upvalue" multiple id="imgUploadtwo"> 
                                <span class="uploadImgIcon"></span>
                            </div> 
                        </div>
                         
                        <p class="loadmsg">请上传图片 ！</p>   
                    </div>
                    
                </div>
                <div class="diago-bottom">
                    <div class="totrue" id="sureUpload">确定</div>
                    <div class="cancel" onclick="cancelDialogP()">取消</div>
                </div>
                <div class="loading-img">
                    <div class="loading">
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>
            </div>
        </div>

        

        

        <script src="./js/config.js?version=1.2.8"></script>
        <!-- <script src="./js/main.js?version=1.2.81"></script> -->
        <script src="./js/swiper.min.js"></script>
        <script src="./js/swiper.animate.min.js"></script>
        <script>
            // var modulenumber = localStorage.module;
            // var jpathurls = '?userId=' + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
            // if (modulenumber == 1) {
            //     location.href = "./index.html" + jpathurls
            // } else if (modulenumber == 2) {
            //     location.href = "./index2.html" + jpathurls
            // } else if (modulenumber == 3) {
            //     location.href = "./index3.html" + jpathurls
            // } else if (modulenumber == 4) {
            //     location.href = "./index4.html" + jpathurls
            // }

            //判断鼠标静止插件
            (function($){
                $.fn.moveStopEvent = function(callback){
                    return this.each(function() {
                    var x = 0,
                        y = 0,
                        x1 = 0,
                        y1 = 0,
                        isRun = false,
                        si,
                        self = this;
                    
                    var sif = function(){
                        si = setInterval(function(){
                            if(x == x1 && y ==y1){
                            clearInterval(si);
                            isRun = false;
                            callback && callback.call(self);
                            }
                            x = x1;
                            y = y1;
                        }, 500);
                    }
                    
                    $(this).mousemove(function(e){
                        x1 = e.pageX;
                        y1 = e.pageY;
                        !isRun && sif(), isRun = true;
                    }).mouseout(function(){
                        clearInterval(si);
                        isRun = false;
                    });
                    });
                }
            })(jQuery);
            

            //获取浏览器页面可见高度和宽度  
            var _PageHeight = document.documentElement.clientHeight,  
                _PageWidth = document.documentElement.clientWidth;  
            //计算loading框距离顶部和左部的距离（loading框的宽度为215px，高度为61px）  
            var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,  
                _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;  
            //在页面未加载完毕之前显示的loading Html自定义内容  
            var _LoadingHtml =
            '<div id="loadingDiv" style="position:absolute;top:0;left:0;height:calc(100% + 160px);width:100%;background: #e6907f;z-index:999">' +
            '<div class="loading loadingT"><span></span><span></span><span></span><span></span><span></span></div>' +
            '<div class="load-o">加载中...</div>' +
            '<div>'; 
            //呈现loading效果  background: #fff url(Image/loading.gif) no-repeat scroll 5px 10px;
            //document.write(_LoadingHtml);  
              
            /*window.onload = function () {  
               setTimeout(function(){
                loadingMask = document.getElementById('loadingDiv');  
                    document.getElementById('loadingDiv').parentNode.removeChild(loadingMask);
                    console.log(this);
                },3000);
            };*/
              
            //监听加载状态改变  
            document.onreadystatechange = completeLoading;  


            document.write(_LoadingHtml); 
              
            //加载状态为complete时移除loading效果  
            function completeLoading() {  
                if (document.readyState == "complete") {  
                setTimeout(function(){
            //         loadingMask = document.getElementById('loadingDiv');  
            //         document.getElementById('loadingDiv').parentNode.removeChild(loadingMask);
                    console.log(this);
                },3000);
                }  
            }  
        
        var myscroll;
        // var myScroll = new IScroll('.modelUl', {
        //     scrollX: true,
        //     scrollY: true,
        //     probeType: 3,//probeType ： 1   滚动不繁忙的时候触发;probeType ： 2   滚动时每隔一定时间触;probeType ： 3   每滚动一像素触发一次
        //     scrollbars: 'custom',
        //     preventDefault: true,//是否屏蔽默认事件
        // });  
        function loaded(){
                   myscroll=new iScroll(".modelUl");
         }
        window.addEventListener("DOMContentLoaded",loaded,false);

        $('.modelUl').on('touchmove', function (e) { e.preventDefault(); }, false);

                    
        </script>
        <script>
            
            //*******************************模拟数据***************************************//
            $(".gomain-sys").click(
                function () {
                    if ($(".truemodel").css("display") == "block") {
                        $(".truemodel").css("display", "none");
                    } else {
                        $(".truemodel").css("display", "block");
                    }
                }
            )
                    
            // $(document).mousemove(function(){
            //     // console.log('移动了');
            //     $(".system").show();
            // }).moveStopEvent(function(){
            //     // console.log('不移动了');  
            //     setTimeout(function(){
            //         $(".system").hide();
            //     },5000);                                   
            // });

            $(document).on('touchstart',function(){
                $(".system").show();
            })
            $(document).on('touchend',function(){
                setTimeout(function(){
                    $(".system").hide();
                },10000) 
            })

            //轮播初始化 
            var swiperTime = localStorage.getItem("timeSet") || "10000";            
            var mySwiper = new Swiper('.main-container', {
                // slidesPerView: 1,
                // slidesPerGroup: 1,
                // speed: 1000,
                // spaceBetween: 30,
                //freeMode: true,
                loop: true,
                noSwiping: true,
                autoplay: swiperTime,
            //     autoplay: {
            // 　　　　delay: 3000,
            // 　　　　disableOnInteraction: false
            // 　　},
                // touchRatio:0.01,
                // autoplayDisableOnInteraction:true,
                // initialSlide: Number(num)-1,
                pagination: '.swiper-pagination',
                paginationClickable :true,
                // allowTouchMove: false,
            });   

            

            $(".truelists").click(
                function () {
                    $(".diago").css("display", "block");
                }
            )
            $('.inedit').click(function(e) {
                e.preventDefault();
                $('.dialogP').show();
                mySwiper.stopAutoplay();
            })

            // 切换模板
            var numT = 0;
            $('.model-list ul li').click(function () {
                $(this).addClass('active').siblings().removeClass('active');
                numT = $(this).index();
            })
            //确认设置模板，跳转，本地存储（module）
            var jpathurl = '?userId=' + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
            $(".totrue").click(
                function () {
                    $(".diago").css("display", "none");
                    if (numT == 0) {
                        location.href = "./index.html" + jpathurl
                        localStorage.setItem("module", 1)
                    } else if (numT == 1) {
                        location.href = "./index2.html" + jpathurl
                        localStorage.setItem("module", 2)
                    } else if (numT == 2) {
                        location.href = "./index3.html" + jpathurl
                        localStorage.setItem("module", 3)
                    } else if (numT == 3) {
                        location.href = "./index4.html" + jpathurl
                        localStorage.setItem("module", 4)
                    }else if (numT == 4) {
                        location.href = "./index5.html" + jpathurl
                        localStorage.setItem("module", 5)
                    }
                }
            )
            $(".goback-sys").click(
                function () {
                    location.href = "./index4.html" + jpathurl
                    localStorage.setItem("module", 4)
                }
            )
            //关闭弹窗
            $(".diago-close").click(
                function () {
                    $(".diagoT").css("display", "none");
                    $(".diago").css("display", "none");
                    $(".diagoTime").css("display", "none");
                    $(".truemodel").css("display", "none");
                    
                }
            )
            function closeDialogP(){
                $(".dialogP").css("display", "none");
                mySwiper.startAutoplay();
            }
            //间隔时间修改样式
            $(".jgsj").click(
                function () {
                    if (timeSet == 3000) {
                        $(".itemt").removeClass("active");
                        $(".itemt").eq(0).addClass("active");
                    } else if (timeSet == 5000) {
                        $(".itemt").removeClass("active");
                        $(".itemt").eq(1).addClass("active");
                    } else if (timeSet == 10000) {
                        $(".itemt").removeClass("active");
                        $(".itemt").eq(2).addClass("active");
                    } else if (timeSet == 20000) {
                        $(".itemt").removeClass("active");
                        $(".itemt").eq(3).addClass("active");
                    }
                    $(".diagoTime").css("display", "block");
                }
            )
            $(".cancel").click(
                function () {
                    $(".diago").css("display", "none");
                    $(".truemodel").css("display", "none");
                    $(".diagoTime").css("display", "none");                 
                }
            )
            function cancelDialogP(){
                $(".dialogP").css("display", "none");
                mySwiper.startAutoplay();
            }
            //编辑口号
            $(".changekh").click(
                function () {
                    $(".diagoT").css("display", "block");
                    $("#cont-value").val($(".titlep").text());
                }
            )
            $(".btn").click(
                function () {
                    kouhao();
                    $(".diagoT").css("display", "none");
                    $(".truemodel").css("display", "none");
                }
            )
            $(".cancelbtn").click(
                function () {
                    $(".diagoT").css("display", "none");
                    $(".truemodel").css("display", "none");
                    $(".diagoTime").css("display", "none");
                }
            )
            //间隔时间设置
            var timeSet = 10000;
            if (localStorage.getItem('timeSet')) {
                timeSet = localStorage.getItem('timeSet');
            }
            $(".itemt").click(
                function (index) {
                    var index = $(this).index();
                    $(".itemt").removeClass('active');
                    $(this).addClass("active");
                    if (index == 0) {
                        timeSet = 3000;
                    } else if (index == 1) {
                        timeSet = 5000;
                    } else if (index == 2) {
                        timeSet = 10000;
                    } else if (index == 3) {
                        timeSet = 20000;
                    }
                }
            )
            $(".btnTime").click(function(){
                $(".diagoTime").css("display", "none");
                $(".truemodel").css("display", "none");
                localStorage.setItem('timeSet', timeSet);
                // console.log(swiperTime);            
                swiperTime = timeSet.toString();
                mySwiper.destroy();
                mySwiper = new Swiper('.main-container', {
                    // slidesPerView: 1,
                    // slidesPerGroup: 1,
                    // speed: 1000,
                    // spaceBetween: 30,
                    //freeMode: true,
                    loop: true,
                    noSwiping: true,
                    autoplay: swiperTime,
                //     autoplay: {
                // 　　　　delay: 3000,
                // 　　　　disableOnInteraction: false
                // 　　},
                    // touchRatio:0.01,
                    // autoplayDisableOnInteraction:true,
                    // initialSlide: Number(num)-1,
                    pagination: '.swiper-pagination',
                    paginationClickable :true,
                    // allowTouchMove: false,
                }); 
            })


            //编辑口号
            function kouhao() {
                var summaryList = $("#cont-value").val();
                var SaveWallInfo = new FormData();
                var saveParams = {
                    userId: userId,
                    data: {
                        bzId: bzId,
                        slogan: summaryList,
                        savetype: "slogan"
                    }
                }
                SaveWallInfo.append(
                    'json', JSON.stringify(saveParams)
                )
                $.ajax({
                    url: baseUrl + 'api/Culture/SaveWallInfo',
                    data: SaveWallInfo,
                    type: "POST",
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        console.log(data);
                        location.href = "./index.html" + jpathurl
                        // location.href="./detail1.html?number=2"
                    }
                })
            }
            //跳转到详情页面
            function changetogo(index) {
                location.href = "./detail/detail1.html?number=" + index + '&userId=' + userId + "&bzId=" + bzId +
                    "&regDeptId=" + regDeptId;
            }

            // var mySwiper = new Swiper('.main-container', {
            //         // slidesPerView: 1,
            //         // slidesPerGroup: 1,
            //         // speed: 1000,
            //         // spaceBetween: 30,
            //         //freeMode: true,
            //         loop: true,
            //         noSwiping: true,
            //         autoplay:localStorage.getItem("timeSet"),
            //     //     autoplay: {
            //     // 　　　　delay: 3000,
            //     // 　　　　disableOnInteraction: false
            //     // 　　},
            //         // touchRatio:0.01,
            //         // autoplayDisableOnInteraction:true,
            //         // initialSlide: Number(num)-1,
            //         pagination: '.swiper-pagination',
            //         paginationClickable :true,
            //         // allowTouchMove: false,
            //     });

            // 点击全屏预览，再点击收缩
            function toggleImg() {
                event = event||window.event;
                var target = document.elementFromPoint(event.clientX, event.clientY);
                k =event.target.offsetWidth/event.target.offsetHeight
                showBig(target.src,k);
            }

            function showBig(src,k){
                $('#popup img').attr('src',src);
                var j = $(window).width()/$(window).height();
                if(j<k){
                    $('#popup img').css({
                        'width': '100%',
                        'height': 'auto'
                    })
                }else{
                    $('#popup img').css({
                        'width': 'auto',
                        'height': '100%'
                    })
                }
                $('#popup').show()
            }
                        

            $('#popup').click(function(){
                $(this).hide()
            })
            //图片删除
            function toggleImgClose(event,num) {  
                event.stopPropagation();
                var $targetImg = $(event.currentTarget);
                var delStatus = confirm('确认这张图片删除吗？');
                if (delStatus) {
                    var index = $targetImg.parent().index();
                     tempFileArr = tempFileArr.filter(function(item,i){
                         return item.index != num
                     })
                    console.log(tempFileArr);
                    // fileinfosArr.splice(index-1, 1);
                    var fileId = $targetImg.prev().attr('data-id');
                    if(fileId){
                        deletArrt.push(fileId);
                    }
                    $targetImg.parent().remove();
                    picLen--;
                    if($('.imgwrapBox').length<9){
                        $('.img-uploadBox').show()
                    }
                }
                
            }

            var deletArrt = [];
            // var fileinfosArr = [];
            var tempFileArr = [];
            var picLen = 0;//上传的图片数量
            // var mySwiper = null;
            //获取页面数据
            getData();
            function getData() {
                $.ajax({
                    url: baseUrl + 'api/Culture/GetScreensaverList',
                    data: {
                        json: JSON.stringify({
                            "userId": userId,
                            "data": {
                                "bzId": bzId
                            }
                        })
                    },
                    contentType: 'application/x-www-form-urlencoded',
                    type: 'POST',
                    success: function(data){
                        if (data.Code == 0) {
                            var imgHtml = '';
                            var imgHtml2 = '';
                            var picArr = data.Data;
                            picLen = picArr.length;
                            if(picLen>=9){
                                $('.img-uploadBox').hide();
                            }
                            if(picArr.length>0){
                                picArr.forEach(function(item){
                                    imgHtml += '<div class="swiper-slide swiper-no-swiping"><img src="'+ item.FilePath +'" alt=""></div>';

                                    imgHtml2 += '<div class="imgwrapBox" onclick="toggleImg()"><img class="loadImg" data-id="' + item.FileId + '"  src="'+ item.FilePath +'" alt=""><div class="img-clicks" onclick="toggleImgClose(event,null)"><img src="./img/system/mode_close.png" alt=""></div></div>'
                                })  
                                
                                // $('.img-clicks').click(function () {
                                //     var fileId = $(this).attr('data-id');
                                //     deletArrt.push(fileId);
                                //     $(this).parent().remove();
                                // })    
                                $('.nodata').hide();  
                                $('.main-container').show();
                                     
                            }else{
                                $('.nodata').show();
                                $('.main-container').hide();
                            } 
                            $('.swiper-list').html(imgHtml);
                            $('.main-container').css('backgroundColor','#000');
                            // $('.upload_imgs').prepend(imgHtml2);  
                            $('.upload_imgs').append(imgHtml2);       
                                if(picArr.length == 1){  
                                    mySwiper.init();    
                                    mySwiper.stopAutoplay();
                                }else{                               
                                    mySwiper.init();                        
                                } 
                            loadingMask = document.getElementById('loadingDiv');  
                            document.getElementById('loadingDiv').parentNode.removeChild(loadingMask);                        
                        }else{
                            $('.nodata').show();
                            $('.main-container').hide();
                        }
                    },
                    error: function(res) {
                        $('.swiper-list').html('暂无数据');
                        $('.main-container').css('backgroud-color', '##eef5ff');
                        $('.nodata').show();
                        $('.main-container').hide();
                    }
                })
            }
            

            //图片上传
            $(document).off('change', '#imgUploadtwo').on('change', '#imgUploadtwo',
                function () {  
                    var files = $('#imgUploadtwo').get(0).files;
                    var spec=/^[A-Za-z0-9]+$/;
                    var imgLength = picLen + files.length;

                    var image_holder = $("#image-holder");
                        image_holder.empty();

                    if(imgLength > 9){
                        alert("图片最多上传9张");    
                        return false;
                    } 
                    var index = $('.upload_imgs').children().length;
                    for(var i = 0;i<files.length;i++){
                        var fileName = files[i].name.split('.')[0];                                 
                        if ((files[i].type.indexOf('image') == -1)) {
                            alert("请上传图片格式文件");
                            return false;
                        }
                        // if(!spec.test(fileName)){
                        //     alert("图片名称限纯数字或英文字母");
                        //     return false;
                        // }
                        if (files[i].size / (1024 * 1024) > 8) {
                            alert("上传的图片不能超过8M");
                            return false;
                        }     

                        var reader = new FileReader();
                        var num =index
                        reader.onload = function (e) {
                        // $("<img />", {
                        //     "src": e.target.result,
                        //     "class": "thumb-image"
                        // }).appendTo($('.upload_imgs'));
                           var imgHtml = '<div class="imgwrapBox" onclick="toggleImg()"><img class="loadImg" src="'+ e.target.result +'" alt=""><div class="img-clicks" onclick="toggleImgClose(event,'+num+')"><img src="./img/system/mode_close.png" alt="" ></div></div>';

                            if(imgLength == 9){
                                $('.img-uploadBox').hide();
                                // $('.upload_imgs').prepend(imgHtml);
                                $('.upload_imgs').append(imgHtml);
                            }else if(imgLength < 9){
                                // $('.upload_imgs').prepend(imgHtml);
                                $('.upload_imgs').append(imgHtml);
                            }
                        }
                        // $('.upload_imgs').show();
                        reader.readAsDataURL($(this)[0].files[i]);
                        // fileinfosArr.push(files[i]);
                        console.log(index);
            
                        tempFileArr.push({
                            index:index,
                            file: files[i]
                        })
                        index=index+1;                         
                    }
                    picLen += files.length;
                    event.target.value = "";  
                    
                })

            //确定上传
            $('#sureUpload').unbind('click').click(function () {
                console.log(tempFileArr);
                var fileinfosArr = [];
                $.each(tempFileArr,function(key,value){                
                    fileinfosArr.push(value.file)
                })
               
                console.log(fileinfosArr);
                var fileArr = []
                var UpdateFile = new FormData();
                var param = {
                    userId: userId,
                    data: {
                        bzId: bzId //班组ID
                    }
                }
                if (deletArrt.length > 0) {
                    param.data.deletefileids = deletArrt.join(",")
                }
                UpdateFile.append(
                    'json', JSON.stringify(param)
                )
                if(fileinfosArr.length>0){
                    fileinfosArr.forEach(function(item){
                        UpdateFile.append('file',item)
                    })
                }
                $(".loading-img").show();
                $.ajax({
                    url: baseUrl + 'api/Culture/SaveScreensaver',
                    data: UpdateFile,
                    type: "POST",
                    contentType: false,
                    processData: false,
                    success: function (res) {
                        $(".loading-img").hide();
                        if (res.Code == 0) {                           
                            $('.dialogP').hide();
                            mySwiper.startAutoplay();
                            deletArrt = [];  
                            fileinfosArr = [];  
                            tempFileArr=[];                                            
                            // $('.upload_imgs .imgwrapBox:not(":last")').remove();                             
                            $('.upload_imgs .imgwrapBox').remove();                                                       
                            getData();                          
                        }else{
                            alert(res.Info);
                        }

                    }
                })
            })

                
        </script>
</body>

</html>